package zhaomh.zlogin;

import org.bukkit.entity.Player;

import static zhaomh.zlogin.Tools.PLUGIN_NAME;
import static zhaomh.zlogin.Tools.colorReplace;
public class PlayerTools {
    private Player player;
    public void setPlayer(Player player){
        this.player = player;
    }
    public PlayerTools(Player player){
        this.player = player;
    }
    public Player getPlayer() {
        return player;
    }
    public String getName() {
        return getPlayerName();
    }
    public String getPlayerName() {
        return player.getName();
    }
    public void sendMessage(String string){
        player.sendMessage(colorReplace(string));
    }
    public void sendPluginMessage(String string){
        player.sendMessage(PLUGIN_NAME +" "+ colorReplace(string));
    }
}
